var limsOrderTask = Gikam.getPageObject({

    getRunBoardColumns : function(){
        return[{
            checkbox : true
        },{index: true},{
            field : 'boardNo',
            title : 'T_LIMS_RUN_BOARD.BOARDNO'
        },{
            field : 'boardCode',
            title : 'T_LIMS_RUN_BOARD.BOARDCODE',
            validators : ['notEmpty',{type: 'unique', rule: '/secure/basemodule/business/run-boards/action/validate-unique'},'strLength[0,33]']
        },{
            field : 'boardSpec',
            title : 'T_LIMS_RUN_BOARD.BOARDSPEC',
            type : 'select',
            validators : ['notEmpty'],
            category : 'sys',
            firstBlank : false,
            param : {
                codeCategoryId_EQ : 'boardSpec'
            }
        },{
            field : 'createdByName',
            title : 'T_CORE_LAUNCH_NEW_PROJECT.CREATEDBYNAME'
        },{
            field : 'createdTime',
            title : 'T_CORE_DV_COEFFICIENT.CREATEDTIME',
            type : 'dateTime'
        }]
    },

    getRunBoardFormFields : function(){
        return[{
            field : 'boardSpec',
            title : 'T_LIMS_RUN_BOARD.BOARDSPEC',
            type : 'select',
            validators : ['notEmpty'],
            category : 'sys',
            firstBlank : false,
            param : {
                codeCategoryId_EQ : 'boardSpec'
            },
            preInsert : true
        },{
            field : 'boardCode',
            title : 'T_LIMS_RUN_BOARD.BOARDCODE',
            validators : ['strLength[0,33]'],
            preInsert : true
        }]
    },

    getEditListColumns : function() {
        return [ {
            checkbox : true
        }, {index: true},{
            field : 'sampleCode',
            title : 'T_LIMS_ORDER_TASK.SAMPLECODE'
        }, {
            field : 'ext$.experimentno',
            title : 'T_LIMS_PRE_FOLDER.EXPERIMENTNO',
        }, {
            field: 'ext$.sampletype',
            title: 'T_LIMS_SAMPLE.SAMPLETYPE',
        }, {
            field: 'ext$.productname',
            title: 'T_LIMS_PRODUCT_MAIN.PRODUCTNAME',
            width: 140,
        }, {
            field : 'batchCode',
            title : 'T_LIMS_ORDER_TASK.BATCHCODE'
        }, {
            field : 'ext$.operationbatch',
            title : 'T_LIMS_OPERATION_BATCH.OPERATIONBATCH'
        }, {
            field : 'createdTime',
            title : 'T_LIMS_RUN.CREATEDTIME'
        }, {
            field : 'ext$.etcode',
            title : 'T_LIMS_EXPERIMENTAL_TEMPLATE.ETNAME',
            type : 'select',
            category : 'experimentalTemplate',
        }];
    },

    getTestListColumns : function() {
        return [ {
            checkbox : true
        }, {index: true},{
            field : 'testCode',
            title : 'T_LIMS_TEST.TESTCODE'
        }, {
            field : 'testName',
            title : 'T_LIMS_TEST.TESTNAME'
        }, {
            field : 'ext$.tasknum',
            title : 'T_LIMS_ORDER_TASK.TASKNUM'
        }]
    },

    getBaseInfoFormFields : function() {
        return [ {
            field : 'batchCode',
            title : 'T_LIMS_ORDER_TASK.BATCHCODE',
            validators : [ 'strLength[0,11]' ]
        }, {
            field : 'sampleCode',
            title : 'T_LIMS_ORDER_TASK.SAMPLECODE',
            validators : [ 'strLength[0,11]' ]
        }, {
            field : 'testCode',
            title : 'T_LIMS_TEST.TESTCODE',
            validators : [ 'strLength[0,11]' ]
        }, {
            field : 'testName',
            title : 'T_LIMS_TEST.TESTNAME',
            validators : [ 'strLength[0,11]' ]
        }, {
            field : 'methodCode',
            title : 'T_LIMS_METHOD.METHODCODE',
            validators : [ 'strLength[0,11]' ]
        }, {
            field : 'methodDesc',
            title : 'T_LIMS_METHOD.METHODDESC',
            validators : [ 'strLength[0,22]' ]
        }, {
            field : 'testerId',
            title : 'T_LIMS_ORDER_TASK.TESTERID',
            validators : [ 'strLength[0,11]' ]
        }, {
            field : 'tester',
            title : 'T_LIMS_ORDER_TASK.TESTER',
            validators : [ 'strLength[0,11]' ]
        }, {
            field : 'reviewerId',
            title : 'T_LIMS_ORDER_TASK.REVIEWERID',
            validators : [ 'strLength[0,11]' ]
        }, {
            field : 'reviewer',
            title : 'T_LIMS_ORDER_TASK.REVIEWER',
            validators : [ 'strLength[0,11]' ]
        }, {
            field : 'runCode',
            title : 'T_LIMS_ORDER_TASK.RUNCODE',
            validators : [ 'strLength[0,11]' ]
        }, {
            field : 'addInRun',
            title : 'T_LIMS_ORDER_TASK.ADDINRUN',
            validators : [ 'strLength[0,1]' ]
        }, {
            field : 'flag',
            title : 'T_LIMS_ORDER_TASK.FLAG',
            validators : [ 'strLength[0,1]' ]
        }, {
            field : 'mixCode',
            title : 'T_LIMS_ORDER_TASK.MIXCODE',
            validators : [ 'strLength[0,11]' ]
        }, {
            field : 'status',
            title : 'T_LIMS_ORDER_TASK.STATUS',
            validators : [ 'strLength[0,4]' ]
        }, {
            field : 'abnormalRemarks',
            title : 'T_LIMS_ORDER_TASK.ABNORMALREMARKS',
            validators : [ 'strLength[0,22]' ]
        }, ];
    },

    getChooseListColumns : function() {
        return [{index: true}, {
            field : 'batchCode',
            title : 'T_LIMS_ORDER_TASK.BATCHCODE'
        }, {
            field : 'sampleCode',
            title : 'T_LIMS_ORDER_TASK.SAMPLECODE'
        }, {
            field : 'testCode',
            title : 'T_LIMS_TEST.TESTCODE'
        }, {
            field : 'testName',
            title : 'T_LIMS_TEST.TESTNAME'
        }, {
            field : 'methodCode',
            title : 'T_LIMS_METHOD.METHODCODE'
        }, {
            field : 'methodDesc',
            title : 'T_LIMS_METHOD.METHODDESC'
        }, {
            field : 'testerId',
            title : 'T_LIMS_ORDER_TASK.TESTERID'
        }, {
            field : 'tester',
            title : 'T_LIMS_ORDER_TASK.TESTER'
        }, {
            field : 'reviewerId',
            title : 'T_LIMS_ORDER_TASK.REVIEWERID'
        }, {
            field : 'reviewer',
            title : 'T_LIMS_ORDER_TASK.REVIEWER'
        }, {
            field : 'runCode',
            title : 'T_LIMS_ORDER_TASK.RUNCODE'
        }, {
            field : 'addInRun',
            title : 'T_LIMS_ORDER_TASK.ADDINRUN'
        }, {
            field : 'flag',
            title : 'T_LIMS_ORDER_TASK.FLAG'
        }, {
            field : 'mixCode',
            title : 'T_LIMS_ORDER_TASK.MIXCODE'
        }, {
            field : 'status',
            title : 'T_LIMS_ORDER_TASK.STATUS'
        }, {
            field : 'abnormalRemarks',
            title : 'T_LIMS_ORDER_TASK.ABNORMALREMARKS'
        }, ];
    },

    getRunListColumns : function() {
        return [ {
            checkbox : true
        }, {index: true},{
            field : 'runCode',
            title : 'T_LIMS_RUN.RUNCODE'
        },{
            field : 'methodCode',
            title : 'T_LIMS_METHOD.METHODCODE',
        }, {
            field : 'methodDesc',
            title : 'T_LIMS_METHOD.METHODDESC',
            validators: ['notEmpty'],
        }, {
            field : 'analystName',
            title : 'T_LIMS_ORDER_TASK.TESTER',
            validators: ['notEmpty'],
        }, {
            field : 'reviewer',
            title : 'T_LIMS_ORDER_TASK.REVIEWER',
            validators: ['notEmpty'],
        },{
            field : 'boardCode',
            title : 'T_LIMS_RUN_BOARD.BOARDCODE',
            validators : ['strLength[0,33]'],
            editor : true
        }, {
            field : 'rejectReason',
            title : 'T_LIMS_RUN.REJECTREASON'
        }, {
            field : 'createdByName',
            title : 'T_LIMS_RUN.CREATEDBYNAME'
        }, {
            field : 'createdTime',
            title : 'T_LIMS_RUN.CREATEDTIME'
        } ];
    },

    getRunTaskListColumns : function() {
        return [ {
            checkbox : true
        }, {index: true},{
            field : 'sampleCode',
            title : 'T_LIMS_ORDER_TASK.SAMPLECODE'
        }, {
            field : 'ext$.experimentno',
            title : 'T_LIMS_PRE_FOLDER.EXPERIMENTNO',
        }, {
            field: 'ext$.sampletype',
            title: 'T_LIMS_SAMPLE.SAMPLETYPE',
        }, {
            field: 'ext$.productname',
            title: 'T_LIMS_PRODUCT_MAIN.PRODUCTNAME',
            width: 140,
        }, {
            field : 'batchCode',
            title : 'T_LIMS_ORDER_TASK.BATCHCODE'
        }, {
            field : 'ext$.operationbatch',
            title : 'T_LIMS_OPERATION_BATCH.OPERATIONBATCH'
        }, {
            field : 'ext$.etcode',
            title : 'T_LIMS_EXPERIMENTAL_TEMPLATE.ETNAME',
            type : 'select',
            category : 'experimentalTemplate',
        }];
    },

    getSampleListColumns: function () {
        return [{
            checkbox: true
        }, {
            index: true
        }, {
            field: 'ext$.batchcode',
            title: 'T_LIMS_BATCH.BATCHCODE',
            width: 140,
            type: 'link'
        }, {
            field: 'sampleCode',
            title: 'T_LIMS_SAMPLE.SAMPLECODE',
            width: 140,
            type: 'link'
        }, {
            field: 'status',
            title: 'T_LIMS_SAMPLE.STATUS',
            width: 140,
            type: 'select',
            category: 'sys',
            param: {
                codeCategoryId: 'batchSpeed'
            },
        }, {
            field: 'sampleType',
            title: 'T_LIMS_SAMPLE.SAMPLETYPE',
            width: 140,
        }, {
            field: 'ext$.productnames',
            title: 'T_LIMS_PRODUCT_MAIN.PRODUCTNAME',
            width: 170,
        }, {
            field: 'ext$.locationdesc',
            title: 'T_LIMS_SAMPLE.LOCATIONS2',// 存放位置
            width: 140,
        }, {
            field: 'locations',
            title: 'T_LIMS_SAMPLE.LOCATIONS',
        }]
    },

    getTemplateInfoColumns: function () {
        return [{
            checkbox: true
        }, {index: true},{
            field: 'sort',
            title: 'T_LIMS_TEST_METHOD_ANALYTE.SORTER',
            width: 100
        }, {
            field: 'status',
            title: 'T_LIMS_FOLDER.STATUS',
            width: 130,
            type: 'select',
            items: [{text: '未下发', value: 'draft'},
                {text: '已下发', value: 'logged'},
                {text: '结果复核', value: 'approval'},
                {text: '已完成', value: 'done'},
                {text: '终止', value: 'stop'},
                {text: '异常', value: 'abnormal'}]
        }, {
            field: 'testCode',
            title: 'T_LIMS_TEST.TESTCODE',
            width: 130
        }, {
            field: 'testName',
            title: 'T_LIMS_TEST.TESTNAME',
            width: 130
        }, {
            field : 'ext$.etname',
            title : 'T_LIMS_EXPERIMENTAL_TEMPLATE.ETNAME',
            width : 120
        }, {
            field : 'lastEtTestIds',
            title : 'T_LIMS_PRE_ORDER_TASK.LASTETTESTIDS',
            width : 140
        }]
    },

    getTaskInfoColumns: function () {
        return [{
            checkbox: true
        },{
            index: true
        }, {
            field: 'status',
            title: 'T_LIMS_ORDER_TASK.STATUS',
            width: 130,
            type: 'select',
            category: 'sys',
            param: {
                codeCategoryId: 'ordTaskStatus'
            },
            // items: [{text: '未下发', value: 'draft'},
            //     {text: '已下发', value: 'logged'},
            //     {text: '结果复核', value: 'approve'},
            //     {text: '已完成', value: 'done'},
            //     {text: '终止', value: 'stop'},
            //     {text: '异常', value: 'abnormal'}]
        }, {
            field: 'runCode',
            title : 'T_LIMS_RUN.RUNCODE',
            type: 'link'
        }, {
            field: 'sampleCode',
            title: 'T_LIMS_ORDER_TASK.SAMPLECODE',
            width: 130
        }, {
            field: 'ext$.sampletype',
            title: 'T_LIMS_SAMPLE.SAMPLETYPE',
        }, {
            field : 'methodCode',
            title : 'T_LIMS_METHOD.METHODCODE'
        }, {
            field : 'methodDesc',
            title : 'T_LIMS_METHOD.METHODDESC'
        }, {
            field : 'tester',
            title : 'T_LIMS_ORDER_TASK.TESTER',
        }, {
            field : 'reviewer',
            title : 'T_LIMS_ORDER_TASK.REVIEWER'
        }]
    },


    baseUrl : IFM_CONTEXT + '/secure/basemodule/business/order-tasks',
    batchSampleUrl : IFM_CONTEXT + '/secure/basemodule/business/batch-samples',
    preOrderTaskUrl : IFM_CONTEXT + '/secure/basemodule/business/pre-order-tasks',
    folderUrl : IFM_CONTEXT + '/secure/basemodule/business/folders',
    runUrl : IFM_CONTEXT + '/secure/basemodule/business/runs',
    testUrl : IFM_CONTEXT + '/secure/basemodule/coredata/tests',
    boardUrl : IFM_CONTEXT + '/secure/basemodule/business/run-boards',
    sampleUrl: IFM_CONTEXT + '/secure/baseline/samplemanage/samples',
    boardHoleUrl : IFM_CONTEXT + '/secure/basemodule/business/run-board-holes',
    orderTaskSupplementUrl: IFM_CONTEXT + '/secure/basemodule/business/order-task-supplements',
});
